package matrix_operations;

public abstract class Pivoting {
	
	protected Matrix M;
	
	
	public boolean isSolube(int p, int i){
		
		return ((p < 0) || (this.M.getValue(p, i) == 0));
	}
		
	
	public int lessInteger(int i){

		int p = -1;
		
		for (int j = i; j < this.M.getN(); j++) {
			if (((j < p) || (p < 0)) && (satisfiability(j, i))){
				p = j;
			}
		}	
		
		return p;
	}
	
	protected abstract boolean satisfiability(int p, int i);
	
	

}
